<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->

<head>

    <!-- Basic Page Needs
  ================================================== -->
    <meta charset="utf-8">
    <title>10Hospital</title>
    <meta name="description" content="Free Responsive Html5 Css3 Templates | zerotheme.com">
    <meta name="author" content="www.zerotheme.com">

    <!-- Mobile Specific Metas
  ================================================== -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <!-- CSS
  ================================================== -->
    <link rel="stylesheet" href="css/zerogrid.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/responsive.css">
    <style>
        input[type=text],
        input[type=file],
        input[type=password],
        input[type=email],
        select {
            border: 1px solid #DCDEE0;
            vertical-align: middle;
            border-radius: 3px;
            height: 50px;
            padding: 0px 16px;
            font-size: 14px;
            color: #555555;
            outline: none;
            width: 60%;
            margin-bottom: 15px;
            line-height: 50px;
            color: #888;
        }

        input[type=submit],
        input[type=button] {
            display: inline-block;
            vertical-align: middle;
            padding: 12px 24px;
            margin: 0px;
            font-size: 16px;
            line-height: 24px;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            cursor: pointer;
            color: #ffffff;
            background-color: #27A9E3;
            border-radius: 3px;
            border: none;
            -webkit-appearance: none;
            outline: none;
            width: 40%;
        }

        table{
            border:2px solid #DCDEE0;
            width: 90%;
            height: 90%;
        }
        th,td{
            border:1px solid #DCDEE0;
            text-align: center;
        }
    </style>

    <script src="js/jquery.min.js"></script>
    <script>
        function over(obj) {
            obj.style.color = "#2196F3";
        }

        function out(obj) {
            obj.style.color = "aliceblue";
        }
        $(function() {
            $.get("header.html", function(data) {
                $("#header").html(data);
            });
            $.post('FindUserServlet', {}, function(data) {
                if (!data) {
                    location.href = "index.html";
                } else {
                    if (data.identity != 'patient') {
                        alert("无权访问");
                        location.href = "index.html";
                    } else {
                        var msg = data.username + "的个人中心";
                        $('#idName').html(msg);
                    }
                }
            });
            $.post('patientRecordServlet', {}, function(data) {
                if(!data){
                    var msg = "<center style='margin: auto'> 您尚未拥有病历 </center>";
                    $("#record").html(msg);
                }else{
                    $("#name").attr("value",data.name);
                    $("#sex").attr("value",data.sex);
                    $("#age").attr("value",data.age);
                    $("#departmentRoom").attr("value",data.departmentRoom);
                    $("#history").attr("value",data.history);
                    $("#symptom").attr("value",data.symptom);
                    $("#project").attr("value",data.project);
                    $("#IDnumber").attr("value",data.idnumber);
                    $('#data').attr("value",data.data);
                    $('#id').attr("value",data.id);
                }
            });
        });
    </script>
    <!--[if lt IE 8]>
    <div style=' clear: both; text-align:center; position: relative;'>
        <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
            <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
        </a>
    </div>
    <![endif]-->
    <!--[if lt IE 9]>
    <script src="js/html5.js"></script>
    <script src="js/css3-mediaqueries.js"></script>
    <![endif]-->

</head>

<body id="archive">
<div class="wrap-body">

    <!--////////////////////////////////////Header-->
    <div id="header">

    </div>


    <!--////////////////////////////////////Container-->
    <section id="container">
        <div class="wrap-container clearfix">
            <div class="zerogrid">
                <div id="sidebar" class="col-1-3">
                    <div class="wrap-sidebar">
                        <div class="widget wid-about">
                            <div class="wid-header">
                                <h5 id="idName"></h5>
                            </div>
                            <div class="wid-content">
                                <br>
                                <a href="patient.html">个人资料</a>
                                <br>
                                <br>
                                <a href="#">查看电子病历</a>
                                <br>
                                <br>
                                <a href="patient_medicine.html">查看药方</a>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="main-content" class="col-2-3">
                    <div class="wrap-content">
                        <div class="contact" id="record" style="background-color: white;">
                            <h2>患者病历</h2>
                            <br>
                            <form id="patientRecord" method="post" style="text-align: center; background-color: white;">
                                <br>
                                <input id="data" style="border:1px solid #DCDEE0; border-radius: 3px; background-color: white; float: left; margin-left: 5%; margin-bottom: 5px" disabled="disabled">
                                <input id="id" style="border:1px solid #DCDEE0; border-radius: 3px; background-color: white; float: right; margin-right: 5%; margin-bottom: 5px" disabled="disabled">
                                <center>
                                    <table>
                                        <th colspan="2"><input id="name" placeholder="姓名" style="background-color: white;" disabled></th>
                                        <th colspan="2"><input id="sex" placeholder="性别" style="background-color: white;" disabled></th>
                                        <th colspan="2"><input id="age" placeholder="年龄" style="background-color: white;" disabled></th>
                                        <tr>
                                            <td colspan="3"><input id="IDnumber" placeholder="身份证号" style="background-color: white;" disabled></td>
                                            <td colspan="3"><input id="departmentRoom" placeholder="科室" style="background-color: white;" disabled></td>
                                        </tr>
                                        <tr>
                                            <td colspan="6"><p style="float: left; margin-left: 2px; size: auto;">过往病史：</p><textarea id="history" style="margin: auto;" placeholder="过往病史" style="background-color: white;" disabled></textarea></td>
                                        </tr>
                                        <tr>
                                            <td colspan="6"><p style="float: left; margin-left: 2px; size: auto;">症状：</p><textarea id="symptom" style="margin: auto;" placeholder="症状" style="background-color: white;" disabled></textarea></td>
                                        </tr>
                                        <tr>
                                            <td colspan="6"><p style="float: left; margin-left: 2px; size: auto;">辅助检查：</p><textarea id="project" style="margin: auto;" placeholder="辅助检查" style="background-color: white;" disabled></textarea></td>
                                        </tr>
                                    </table>
                                </center>
                            </form>
                            <br><br><br>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <br>
    <br>
    <br>
    <!--////////////////////////////////////Footer-->
    <footer>
        <div class="bottom-footer">
            <div class="wrap-bottom ">
                <div class="copyright">
                    <p>©2019 第十组医院</p>
                </div>
            </div>
        </div>
    </footer>


</div>
</body>

</html>